package light.mvc.model.register;

import java.util.Date;

import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

import light.mvc.model.base.IdEntity;
import light.mvc.model.item.Ttreatment;

import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate;

@Entity
@Table(name = "register_treatment")
@DynamicInsert(true)
@DynamicUpdate(true)
public class TregisterTreatment extends IdEntity implements java.io.Serializable {
	private static final long serialVersionUID = 1L;

	private String result;
	
	private Ttreatment treatment;
	private Tregister register;
	
	private Date treatmentTime;
	private Date chargeTime; 
	
	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "treatment_id")
	public Ttreatment getTreatment() {
		return treatment;
	}
	public void setTreatment(Ttreatment treatment) {
		this.treatment = treatment;
	}
	
	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "register_id")
	public Tregister getRegister() {
		return register;
	}
	public void setRegister(Tregister register) {
		this.register = register;
	}
	
	public String getResult() {
		return result;
	}
	public void setResult(String result) {
		this.result = result;
	}
	public Date getTreatmentTime() {
		return treatmentTime;
	}
	public void setTreatmentTime(Date treatmentTime) {
		this.treatmentTime = treatmentTime;
	}
	public Date getChargeTime() {
		return chargeTime;
	}
	public void setChargeTime(Date chargeTime) {
		this.chargeTime = chargeTime;
	}

	
}
